if (!jsx3.lang.Class.forName("ux.cdb.admin.system.user.UserManage")) {
/**
 * Define the <code>name of class</code> class.
 * This class inherit from <code>jsx3.gui.Block<code> GUI class.
 */
jsx3.Class.defineClass(
      "ux.cdb.admin.system.user.UserManage",
      jsx3.gui.Block,
      null,
      function (userManage) {
      userManage.UserInfoReqUIO={
             sysUserId:0,
			 logonName:null,
             userName:null,
             systemUserTypeCode:null,
             certTypeCode:null,
             certId:null,
             ownedDepartmentCode:null,
             ownedDepartmentName:null,
             phoneNbr:null,
             mobileNbr:null,
             email:null,
             selectRoleList:[],
             unselectRoleList:[],
             userRelatedOrg:null
      };
      userManage.InternalOrgId=11000000;// this data should be got from server.  
      userManage.prototype.homedir = 'ux/cdb/admin/system/user/';
      userManage.RoleList={
             selectRoleList:[],
             unselectRoleList:[]
      }
      userManage.Role="bank";
      userManage.Userchanged=false;
      userManage.Orgchanged=false;
      userManage.Rolechanged=false;
      userManage.prototype.bind = function(fn, scope) {
        scope = scope || this;
        return function() {
          fn.apply(scope, arguments)
        }
      };

        /**
         * This method will be called after UI file has deserialized.
        */
        userManage.prototype.onAfterDeserialize = function() {
            //47 get the user's privil
            var objDate=new Date();
            /* @JSC :: begin DEBUG */
            console.log(" onAfterDeserialize start ");
            console.log(objDate);
            /* @JSC :: end */
            var  privil = ux.cdb.admin.Privilege.getPrivilege(51);
            /* @JSC :: begin DEBUG */
            console.log("the privil that user is:");
            console.log(privil);
            /* @JSC :: end */
            if(privil!=null){
                userManage.Role="bank";    
            }else{
                userManage.Role="admin";    
            }
            /* @JSC :: begin DEBUG */
            console.log(userManage.Role);
            /* @JSC :: end */
			var me = this;
			setTimeout(function(){
				me.getInternalOrgId();
			},0);
            this.initData();
        }

      /**
        * use this method to get user's InternalOrgId from the server ,call getInternalOrgId method.
      */

      userManage.prototype.getInternalOrgId=function(){
          var me = this;
          var objDate=new Date();
          /* @JSC :: begin DEBUG */
          jsx3.log("[ux.cdb.admin.system.user.UserManage][onBeforeDeserialize][start]");
          console.log(objDate);
          console.log(objDate.getTime());
          /* @JSC :: end */
           ux.megatron.util.Dwr.callDwr("UserMgrUCC", "getInternalOrgId", null, me, function(dwrobj){
               if(dwrobj!=null){
/* @JSC :: begin DEBUG */
                   jsx3.log("getInternalOrgId:"+dwrobj);
                   console.log("getInternalOrgId:"+dwrobj);
/* @JSC :: end */
                   userManage.InternalOrgId=dwrobj;
                   //userManage.RoleType=dwrobj.OrgId;
                   me.getRoleCommonData();
               }else{
                             /* @JSC :: begin DEBUG */
                   jsx3.log("[ux.cdb.admin.system.user.UserManage][onBeforeDeserialize][execute failed]");
                             /* @JSC :: end */
               }
          }, "UserMgrUCC");
			//get sysuser type[0,1,2]
			ux.megatron.util.Dwr.callDwr("UserMgrUCC", "getSysUserType", null, me, function(dwrobj){
				if(dwrobj!=null){
/* @JSC :: begin DEBUG */
					console.log("getSysUserType:" + dwrobj.content.page.count);
/* @JSC :: end */
					userManage.USER_TYPE = dwrobj.content.page.count;
				}else{
					/* @JSC :: begin DEBUG */
					jsx3.log("[ux.cdb.admin.system.user.UserManage][getSysUserType][execute failed]");
					/* @JSC :: end */
				}
			}, "UserMgrUCC");
             var objDate=new Date();
          /* @JSC :: begin DEBUG */
            console.log(objDate);
            console.log(objDate.getTime());
          jsx3.log("[ux.cdb.admin.system.user.UserManage][onBeforeDeserialize][end]");
          /* @JSC :: end */
      }
        /*@
        *@  this function init the page's data
        */
       userManage.prototype.initData=function(){
            var objDate=new Date();
            /* @JSC :: begin DEBUG */
            console.log("initData start:");
            console.log(objDate);
            console.log(objDate.getTime());
            /* @JSC :: end */
            var parent = ux.megatron.Main.getServer().getBodyBlock();
            this.setCompomentEnable();
            this.matrix = this.get("mtxMain");
            this.pageflag=false;  
            this.matrix.onSelect = this.bind(this._onMatrixSelect, this);
			
			this.get('btnViewDetailInfo').onClick = this.bind(this.onViewDetailInfo, this);

			this.pageSize = 15;
			this.totalRecordCount = 0;
			this.currentPage = 1;
			this.totalPages = 1; 
			this.pageLoaded = false;
			
			this.pagebar = this.get("blkPageWheel");
			
            this.matrix.subscribe(ux.cdb.admin.gui.Matrix.EVENT_CHECKALL, this, this._onMatrixCheckAll);
            var checkbox = this.matrix.get("checkbox");
            checkbox.onToggle = this.bind(this._onCheckMatrix, this);
           /* var me=this;
            setTimeout(function(){
                me.LoadUsers()
            },0);
            */
            this.get("btnRefresh").OnRefresh = this.bind(this.doRefresh, this);
            var objDate=new Date();
            /* @JSC :: begin DEBUG */
            console.log("initData end");
            jsx3.log("+++++++++++++++++++++++++++++++initData End++++++++++++++++++++++++");
            console.log(objDate);
            console.log(objDate.getTime());
            jsx3.log(objDate);
            jsx3.log(objDate.getTime());
             /* @JSC :: end */
            //this.getRoleCommonData();
            //this.getOrgCommonData();
       }
      userManage.prototype.setCompomentEnable = function() {
          this.get("tabbedpane").hide();
          this.get("blkTipInfo").show();
          if(userManage.Role=="admin"){
                 this.setBtns(null, ['btnAdd']);
          }else{
              this.setBtns(['btnAdd'], null);
          }
      }
		userManage.prototype.onViewDetailInfo = function(){
			var recordId = this.matrix.getSelectedNodes().get(0).getAttribute("jsxid");
			this._onMatrixSelect(recordId, true);
		};
      
      userManage.prototype.setBtns = function (enableBtns, disableBtns) {
          if(enableBtns) {
              for(var i=0; i<enableBtns.length; i++) {
                  this.get(enableBtns[i]).enable();
              }
          }
          if(disableBtns) {
              for(var i=0; i<disableBtns.length; i++) {
                  this.get(disableBtns[i]).disable();
              }
          }
      };

      userManage.prototype.UpdateButtons = function() {
        var nodes = this.matrix.getCheckedNodes();
        if(userManage.Role!="admin"){
             if(nodes.size() == 0) {
                 this.setBtns(['btnAdd'], ["btnEdit"]);
             } else if(nodes.size() == 1) {
                  this.setBtns(['btnAdd', 'btnEdit'], null);
             } else {
                  this.setBtns(['btnAdd'], ['btnEdit']);
             }    
        }else if(userManage.Role=="admin"){
             if(nodes.size() == 0) {
                 this.setBtns(null, ["btnEdit"]);
             } else if(nodes.size() == 1) {
                  this.setBtns(['btnEdit'], null);
             } else {
                  this.setBtns(null, ['btnEdit']);
             }    
        }
      }
      
      userManage.prototype._onMatrixCheckAll = function() {
        this.UpdateButtons();
      }
      
      userManage.prototype._onCheckMatrix = function(){
        this.UpdateButtons();
      }
      
      userManage.prototype.onDetailLoaded = function(display){
        this.userDetail = this.get("tabUserDetail").getContentPane().get("blkDetail");
        this.GenericDetail = this.get("tabUserDetail").getContentPane().getDescendantsOfType("ux.cdb.admin.dataautomate.GenericDetail")[0];
        if(!display) return;
        this.GenericDetail.setDataEntityType(ux.cdb.admin.dataautomate.GenericDetail.User);
        this.GenericDetail.setDataEntityId(this.matrix.selectedId);
        this.GenericDetail.setProcessHandler(function(data){
            var selectedRole="";
            for(var i=0;i<data.selectedRoleList.length;i++){
                selectedRole+=data.selectedRoleList[i].roleName+"  ";
                }
                data.sysUser.selectRole=selectedRole;
                data.sysUser.certTypeCode=data.certType;
                data.sysUser.sysUserTypeCode=data.sysUserType;
                 return data.sysUser;
        });
        this.GenericDetail.refreshData();
        this.get("tabbedpane").show();
       //this.updateDetail();
      }
      
      userManage.prototype.updateDetail = function(selectedID) {
        if(!this.userDetail) return;
        try{
            var xml = ux.megatron.Main.getServer().getCache().getDocument('usermanage_1101');
            var record_sel=xml.selectNodes("//record[@jsxid='" +selectedID+ "']");
            if(record_sel.size()>0){
            this.userDetail.setData(record_sel[0]);
            }
           this.userDetail.repaint();
        }catch(ex){
            ux.megatron.Main.logException(ex);
        }
      }
      
      userManage.prototype.loadDetails = function(display) {
        var tabUserDetailPane = this.getDescendantOfName('tabUserDetail').getContentPane();
        if(!tabUserDetailPane.getFirstChild()) {
          var me = this;
          ux.megatron.Main.loadUIResourceAsync(tabUserDetailPane, "ux.cdb.admin", 
            "ux/cdb/admin/system/user/ui/UserManage_DetailPage.xml", me, function(){me.onDetailLoaded(display);});
        }
      }
      
      userManage.prototype._doAddUser = function(){
        var mainPane = this.getDescendantOfName('blkWorld');
        if(!mainPane) {
          mainPane =  ux.megatron.Main.getServer().getBodyBlock();
        var me = this;
        ux.megatron.Main.loadUIResourceAsync(mainPane,"ux.cdb.admin","ux/cdb/admin/system/user/userWizard/ui/userBuilderDailog.xml",me,me.onAddWizardLoaded);
        }
      }
      
      userManage.prototype.onAddWizardLoaded = function(objEvent) {
        objEvent.obj.Operation = 'Insert';
        var strTitle = this.property("@cdb@System@UserManage@Wizard@NewUser");
        objEvent.obj.get('labTitle').setText(strTitle, true);
        objEvent.obj.get("steppedWizard").setEnableStepJump(false);
      }

      userManage.prototype.onEditWizardLoaded = function(objEvent) {
        objEvent.obj.Operation = 'Edit';
        var strTitle = this.property("@cdb@System@UserManage@Wizard@EditUser");
        objEvent.obj.get('labTitle').setText(strTitle, true);
        objEvent.obj.get("steppedWizard").setEnableStepJump(true);
      }

      userManage.prototype._doSearch = function() {
        /* @JSC :: begin DEBUG */
        console.log("[_doSearch][start]");
        /* @JSC :: end */
        this.doQuery();
      }
      
            
      userManage.prototype._doEditUser = function(){
          var me = this;
		  var node = this.matrix.getCheckedNodes().get(0);
          var sysUserId=parseInt(node.getAttribute('jsxid'));
		  var internalOrgId = node.getAttribute('userRelatedOrg');
		  var userType = node.getAttribute('systemUserTypeCode');
          ux.megatron.util.Dwr.callDwr("UserMgrUCC", "getAllUserInfo", [internalOrgId,sysUserId,null,-1,userType], me, me._getAllUserInfoCallback, "UserMgrUCC");

      }
      userManage.prototype._getAllUserInfoCallback=function(dwrobj){
           /* @JSC :: begin DEBUG */
           console.log("[_getAllUserInfoCallback][start]");
           console.log(dwrobj);
           /* @JSC :: end */
           var mainPane = this.getDescendantOfName('blkWorld');
           if(!mainPane) {
              mainPane =  ux.megatron.Main.getServer().getBodyBlock();
           }
           var me = this;
          if(dwrobj.res.flag==1){
              try{
                  for(element in dwrobj.content.data[0].sysUser){
                      //if(typeof dwrobj.content.data[0].sysUser[element] == "string" || dwrobj.content.data[0].sysUser[element]  instanceof String ){
                          userManage.UserInfoReqUIO[element]=dwrobj.content.data[0].sysUser[element];
                         // console.log(element+":"+dwrobj.content.data[0].sysUser[element]+":"+userManage.UserInfoReqUIO[element]);
                      //}
                 }
                var selecteddoc = jsx3.xml.CDF.Document.newDocument();
                var unselecteddoc = jsx3.xml.CDF.Document.newDocument();
                for(var i=0;i<dwrobj.content.data[0].selectedRoleList.length;i++){
                     if(dwrobj.content.data[0].selectedRoleList[i].sysRoleId){
                          dwrobj.content.data[0].selectedRoleList[i]["jsxid"]=dwrobj.content.data[0].selectedRoleList[i].sysRoleId;
                     }
                    selecteddoc.insertRecord(dwrobj.content.data[0].selectedRoleList[i], "jsxroot");
               }
               for(var i=0;i<dwrobj.content.data[0].unSelectedRoleList.length;i++){
                     if(dwrobj.content.data[0].unSelectedRoleList[i].sysRoleId){
                          dwrobj.content.data[0].unSelectedRoleList[i]["jsxid"]=dwrobj.content.data[0].unSelectedRoleList[i].sysRoleId;
                     }
                     unselecteddoc.insertRecord(dwrobj.content.data[0].unSelectedRoleList[i], "jsxroot");
               }
               userManage.UserInfoReqUIO.selectRoleList=dwrobj.content.data[0].selectedRoleList;
                                                     /* @JSC :: begin DEBUG */
               jsx3.log("Rolelist:"+dwrobj.content.data[0].selectedRoleList);
                                                    /* @JSC :: end */
               userManage.RoleList.selectRoleList=[];
               userManage.RoleList.unselectRoleList=[];
               userManage.RoleList.selectRoleList.push(selecteddoc);
               userManage.RoleList.unselectRoleList.push(unselecteddoc);
               setTimeout(function(){
                   ux.megatron.Main.loadUIResourceAsync(mainPane,"ux.cdb.admin","ux/cdb/admin/system/user/userWizard/ui/userBuilderDailog.xml",me,me.onEditWizardLoaded);
               },0);
            }catch(ex){
               /* @JSC :: begin DEBUG */
               jsx3.log(ex);
               /* @JSC :: end */
           }
        }else{
               /* @JSC :: begin DEBUG */
            jsx3.log("getAllUserInfo can not get data failed");
               /* @JSC :: end */
        }
               /* @JSC :: begin DEBUG */
        console.log("[_getAllUserInfoCallback][End]");
               /* @JSC :: end */
      }
      userManage.prototype.property = function(name, token) {
        return ux.megatron.Main.getServer().getDynamicProperty(name, token);
      };
            
      userManage.prototype._doDeleteUser = function(){
        var me = this;
        var tipInfo = this.property("@cdb@System@UserManage@Wizard@UserWizard@DeleteUserTipInfo");
        var tipTitle = this.property("@cdb@System@UserManage@Wizard@UserWizard@DeleteUserTipTitle");
        
//                  ux.megatron.Main.callDwr("AddStudentInfoUCC", 
//                       "AddStudentInfoUCC", 
//                       function() {
//                         AddStudentInfoUCC.saveBasicInfo(dataObj,
//                                           function(obj){
//                                            console.log(obj);   
//                                          });s
        var params = [];
        var nodes = me.matrix.getCheckedNodes();
        for(var i = 0; i < nodes.size(); i++) {
              params.push(nodes.getItem(i).getAttribute('jsxid'));
        }
        ux.megatron.util.Dwr.callDwr("UserMgrUCC", "deleteUserInfo", [params], me, function(dwrobj){
           if(dwrobj.res.flag=="1"){
               var result =  ux.megatron.Dialog.confirm(tipTitle, tipInfo, function(dialog){
                   me.matrix.repaintData();
                   me.UpdateButtons();
                   me.setCompomentEnable();
                   dialog.doClose();
                   for(var i=0; i<params.length;i++){
                       me.get("mtxMain").deleteRecord(params[i]);
                   }
              });
           }else{
               /* @JSC :: begin DEBUG */
               jsx3.log("deleteUserInfo execute failed");
               /* @JSC :: end */
           }
        }, "UserMgrUCC");
      }
      /*
      *
      */
      userManage.prototype.onDeleteUser = function() {
          var me = this;
          var tipTitle = this.property("@cdb@contract@DlgDeleteTitle");
          var tipContent = this.property("@cdb@contract@DlgDeleteContent");
          ux.megatron.Dialog.confirm(tipTitle, tipContent, function(dialog){
              var nodes = me.matrix.getCheckedNodes();
              for(var i = 0; i < nodes.size(); i++) {
                  me.matrix.deleteRecord(nodes.getItem(i).getAttribute('jsxid'));
              }
              me.matrix.repaintData();
              me.onCheckMatrix();
              me.onSelectMatrix();
              dialog.doClose();
          }, null);
      };
      
      userManage.prototype._onMatrixSelect = function(recordId, display) {
       try{
            this.get("blkTipInfo").hide();
			this.get("tabbedpane").show();
/* @JSC :: begin DEBUG */
			jsx3.log('_onMatrixSelect : ' + recordId + ':'+ display);
/* @JSC :: end */
			var node = this.matrix.getSelectedNodes().get(0);
			var internalOrgId = node.getAttribute('userRelatedOrg');
			var userType = node.getAttribute('systemUserTypeCode');
		  
            this.matrix.selectedId = recordId + '_' + internalOrgId + '_' + userType;
            var tabUserDetailPane = this.getDescendantOfName('tabUserDetail').getContentPane();
            if (!tabUserDetailPane.getFirstChild()) {
                this.loadDetails(display);
            }
			if(display){
                this.GenericDetail.setDataEntityType(ux.cdb.admin.dataautomate.GenericDetail.User);
                this.GenericDetail.setDataEntityId(this.matrix.selectedId);
                this.GenericDetail.setProcessHandler(function(data){
                    var selectedRole="";
                    for(var i=0;i<data.selectedRoleList.length;i++){
                        selectedRole+=data.selectedRoleList[i].roleName+"  ";
                    }
                    data.sysUser.selectRole=selectedRole;
                    data.sysUser.certTypeCode=data.certType;
                    data.sysUser.sysUserTypeCode=data.sysUserType;
                    return data.sysUser;
                });
                this.GenericDetail.refreshData();
            }
         }catch(ex){
               ux.megatron.Main.logException(ex);
         }
      };
	/*@
	*     //get user list function.
	@*/
      userManage.prototype.doRefresh = function() {
		this.doQuery(true);
	  };
	  
      userManage.prototype.doQuery = function(refresh) {
	    this.isQuery = false;
		if(!refresh) this.isQuery = true; 
		this.currentPage = 1;
		this.LoadUsers();
	  };
	  
      userManage.prototype.LoadUsers = function() {
            /* @JSC :: begin DEBUG */
            console.log("[LoadUsers][start]");
            jsx3.log("++++++++++++++++++++++++++++++++LoadUser start++++++++++++++++++++++++++++");
            /* @JSC :: end */
            var objDate=new Date();
            /* @JSC :: begin DEBUG */
            jsx3.log(objDate.getTime());
            console.log(objDate.getTime());
            /* @JSC :: end */
            //this.PageWheel.show();
			var me = this;
			var params = [null,null,null,-1,this.currentPage,this.pageSize];
			if(this.isQuery === true){
				params = [
					!(me.get("selbank").getValue())		?	null:	me.get("selbank").getValue(),
					!(me.get("txtUserNumber").getValue())	?	null:	me.get("txtUserNumber").getValue(),
					!(me.get("txtUserName").getValue())	?	null:	me.get("txtUserName").getValue(),
					!(me.get("selRole").getValue())		?	-1:		parseInt(me.get("selRole").getValue()),
					this.currentPage,
					this.pageSize
	            ];
			}
            /* @JSC :: begin DEBUG */
            jsx3.log('LoadUsers : params : ' + params);
            /* @JSC :: end */
			ux.megatron.util.Dwr.callDwr("UserMgrUCC", "getUserList", params, this, this.UserListcallback, "UserMgrUCC");
      }
       /*@
       *     //get user list call back.
       @*/
      userManage.prototype.UserListcallback = function(dwrObject){
            var objDate=new Date();
                                               /* @JSC :: begin DEBUG */
            jsx3.log("++++++++++++++++++++++++++++++++LoadUser data  get++++++++++++++++++++++++++++");
            jsx3.log(dwr.util.toDescriptiveString(dwrObject,5));
            jsx3.log(objDate.getTime());
                                                   /* @JSC :: end */
          if(dwrObject!=null){
			this.loadPageControler(dwrObject.content.page.count);
               //console.log(dwrObject);
                                                              /* @JSC :: begin DEBUG */
               console.log(dwrObject.content.data);
                                                                  /* @JSC :: end */
               if(dwrObject.res.flag==1){
                   var datadwr=dwrObject.content.data;
                   for(var i=0;i<datadwr.length;i++){
                       if(datadwr[i].roleDispList){
                        datadwr[i].roleDispList=null;
                        datadwr[i].unSelectedRoleList=null;
                       }
                       var selectedRole="";
                       for(var j=0;j<datadwr[i].selectedRoleList.length;j++){
                          selectedRole+=datadwr[i].selectedRoleList[j].roleName+"  ";
                      }
                      datadwr[i].selectRole=selectedRole;
                  }
					var cdfDoc = ux.megatron.util.Dwr.toCdfDocument(datadwr, "jsxroot", {"sysUserId": "jsxid"}); 
					//console.log('UserManage#loadUser cdf:',cdfDoc);
					var me = this;
					setTimeout(function(){
					   me.getServer().getCache().setDocument(me.matrix.getXMLId(), cdfDoc);
					   me.matrix.repaintData();
					   me.setCompomentEnable();
					   me.UpdateButtons();
				   },0);
              }else{
                        /* @JSC :: begin DEBUG */
                  jsx3.log("getUserList get data failed");
                        /* @JSC :: end */
              }
          }
       };
       
		userManage.prototype.loadPageControler = function(count) {
			this.totalRecordCount = count;
			this.totalPages = (count%this.pageSize>0) ? (parseInt(count/this.pageSize, 10) + 1) : (count/this.pageSize);
			if(!this.pageLoaded){
				var me = this;
				this.pagebar.initialize();
				this.pagebar.bindWithMatrix(me,me.onPageChange,me.matrix);
				this.pageLoaded = true;
			}
			this.pagebar.setValue(this.currentPage, this.totalPages, this.pageSize, this.totalRecordCount);
		};

		userManage.prototype.onPageChange = function(msg) {
			this.isQuery = true;
			this.currentPage = msg.currentPageNumber;
			this.LoadUsers();
		};

		userManage.prototype._onChangeFun=function(msg){
               this.PageWheel.curNum = msg.currentPageNumber;
                        /* @JSC :: begin DEBUG */
               console.log("+++++++++++onChangeFun start ++++++++++++");
               //var curNo=this.PageWheel.txtCurPageNo.getValue();
               console.log("txtCurPageNo:"+this.PageWheel.curNum);
               console.log(userManage.InternalOrgId);
                        /* @JSC :: end */
				var me = this;
				var searchObj={
                      bankName:     !(me.get("selbank").getValue())?null:me.get("selbank").getValue(),
                      userNumber:   !(me.get("txtUserNumber").getValue())?null:me.get("txtUserNumber").getValue(),
                      userName:     !(me.get("txtUserName").getValue())?null:me.get("txtUserName").getValue(),
                      userRole:     !(me.get("selRole").getValue())?-1:parseInt(me.get("selRole").getValue())
                      };
				var params = [searchObj.bankName,searchObj.userNumber,searchObj.userName,searchObj.userRole,this.PageWheel.curNum,10];
			   ux.megatron.util.Dwr.callDwr("UserMgrUCC", "getUserList", params, this, this.UserListcallback, "UserMgrUCC");
              // this.PageWheel.curNum=this.currentPage;
       };

       /*@
       *     //get the user role data from user for Role CommonBox, Common code do not contain it.
       @*/
       userManage.prototype.getRoleCommonData=function(){
			var params = [
				ux.cdb.admin.Privilege.getUser().systemUserTypeCode,
				ux.cdb.admin.Privilege.getUser().userRelatedOrg
			];
			/* @JSC :: begin DEBUG */
			jsx3.log('getRoleCommonData params : ' + params);
			/* @JSC :: end */
           ux.megatron.util.Dwr.callDwr("UserMgrUCC", "getRoleList", [], this, function(dwrobj){
           if(dwrobj!=null){
              if(dwrobj.res.flag == 1){
                var _selectProperty = ux.megatron.Main.getServer().getDynamicProperty("@cdb@Select Default Text");
                var defaultRecord = [{sysRoleId:'-1', roleName:_selectProperty, jsxstyle:'width:100%;'}];
                var dataArray = defaultRecord.concat(dwrobj.content.data);
                var cdfDoc = ux.megatron.util.Dwr.toCdfDocument(dataArray, "jsxroot", {"sysRoleId": "jsxid","roleName":"jsxtext"});
                this.get('selRole').setSourceXML(cdfDoc);
                this.get('selRole').repaint();
              }else{
                        /* @JSC :: begin DEBUG */
                 jsx3.log("[userManage][getRoleCommonData][getRoleList] server occur exception");
                        /* @JSC :: end */
              }
          }
         }, "UserMgrUCC");
       };
	   
       userManage.prototype.setCommonCache = function(){
			var _cache = ux.cdb.admin.CommonCache.getInstance();
			this.get('selbank').setSourceXML(_cache.getCache('CommonCache_INTERNAL_ORG'));
			this.get('selbank').repaint();
	   };
	   
       /*@
       *     //get the user role data from user for Role CommonBox, Common code do not contain it.
       @*/
       userManage.prototype.getOrgCommonData = function(){
           ux.megatron.util.Dwr.callDwr("UserMgrUCC", "getOrgList", [], this, function(dwrobj){
				 if(dwrobj!=null){
	               if(dwrobj.res.flag==1){
	                    //var cdfDoc = ux.megatron.util.Dwr.toCdfDocument_forTree(dwrobj, "jsxroot", {"id": "jsxid"},"chnFullName");
	                    // var cdfDoc = ux.megatron.util.Dwr.toCdfDocument_forTree(dwrobj, "jsxroot", {"id": "jsxid"},{"chnFullName","jsxtext"});
	                    var _selectProperty = ux.megatron.Main.getServer().getDynamicProperty("@cdb@Select Default Text");
	                    var defaultRecord = [{id:'', chnFullName:_selectProperty, jsxstyle:'width:100%;'}];
	                    var dataArray = defaultRecord.concat(dwrobj.content.data);
	                    var cdfDoc = ux.megatron.util.Dwr.toCdfDocument(dataArray, "jsxroot", {"id": "jsxid","chnFullName":"jsxtext"});
	                    this.get('selbank').setSourceXML(cdfDoc);
	                    this.get('selbank').repaint();
	                }else{
	                     jsx3.log("[userManage][getOrgCommonData][getOrgCommonData] server occur exception");
	                }
	           }
          }, "UserMgrUCC");
       }

     });
}